/********************************************************************
	created:	2008/12/21
	created:	21:12:2008   22:54
	filename: 	g:\Projects On Develop\board-game\protype\BattleLine\BattleLine\BattleLineRegion.cpp
	file path:	g:\Projects On Develop\board-game\protype\BattleLine\BattleLine
	file base:	BattleLineRegion
	file ext:	cpp
	author:		Ray Xi
	
	purpose:	each region is to be claimed in game
*********************************************************************/
#include "StdAfx.h"
#include "BattleLineRegion.h"

CBattleLineRegion::CBattleLineRegion(void)
{

}

CBattleLineRegion::~CBattleLineRegion(void)
{

}

void CBattleLineRegion::Init(int numTroops)
{
	CGameEntity::Init();

	m_iNumOfTroops = numTroops;
	for(int i = 0;i < m_iNumOfTroops;i++)
		m_oTroopArray[i].Init();
}

void CBattleLineRegion::Update(float fTime)
{
	CGameEntity::Update(fTime);

	for(int i = 0;i < m_iNumOfTroops;i++)
		m_oTroopArray[i].Update(fTime);
}

void CBattleLineRegion::Render()
{
	CGameEntity::Render();

	for(int i = 0;i < m_iNumOfTroops;i++)
		m_oTroopArray[i].Render();
}

void CBattleLineRegion::Deinit()
{

	for(int i = 0;i < m_iNumOfTroops;i++)
		m_oTroopArray[i].Deinit();

	CGameEntity::Deinit();
}
